<?php

namespace App\Http\Controllers\Admin;

use App\models\Admin;
use App\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class SearchController extends Controller
{
    public function searchUser(Request $request)
    {
        $data = $request->all();
        $name = $data['name'];
        $users = Admin::where('name',$name)->first();
//        dd($users);
        return view('admin.search_user',compact('users'));
    }
}
